package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Member;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


public interface MemberDao {

    @Select("select * from t_member where phoneNumber = #{telephone}")
    Member findByPhoneNumber(String telephone);

    void add(Member member);

    Member findById(Integer member_id);

    @Select("select count(*) from t_member where regTime <= #{date}")
    Integer findNumsByEndDate(String date);

    Integer findNumsByDate(@Param("date") String date, @Param("startDate") String startDate);

    // 新功能添加的方法
    Page<Member> findPage(@Param("queryString") String queryString);

    void delete(Integer id);

    void update(Member member);
}
